<template>
    <div>
        <br />
  
        <headers/>
        <div class="container">

            <div class="item_column">
                <div class="left">   
                    
                </div>

                <div class="right"> 

                  <h1>发布小说</h1>

                  <van-field  label="标题" v-model="form.title"/>

                  <van-button @click="submit">发布</van-button>
                    
                </div>

            </div>

        </div>
        
    </div>
</template>
  
<script>
import maxios from '../http/axios'
import headers from './headers.vue'
export default {

    components: {
      'headers':headers,
    },
  
    data() {
      return {
        
        form:{'userid':localStorage.getItem("uid")}
       
      }
    },
    methods: {

      submit(){

        maxios('/newsM','post',this.form).then(res => {

          alert("发布成功")
          
          console.log(res)
        })

      }

    },
    mounted() {
       
    }
  }
</script>
  
<style scoped>
@import url("../assets/style.css");


</style>